IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = object_id(N'[dbo].[UpdateDistrito]') AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
	DROP PROCEDURE [dbo].[UpdateDistrito]
GO

CREATE PROCEDURE [dbo].[UpdateDistrito]
(
	@IdDistrito int,
	@IdProvincia int,
	@Nombre varchar(150),
	@Flete money,
	@Estado bit
)
AS
BEGIN
	SET NOCOUNT ON

	UPDATE [Distrito]
	SET [IdProvincia] = @IdProvincia, 
		[Nombre] = @Nombre, 
		[Flete] = @Flete,
		[Estado] = @Estado
	WHERE [IdDistrito] = @IdDistrito

	SET NOCOUNT OFF
END

GO
